pp108 : Running WS-AppServer in Multitenant Mode

Running WS-AppServer in Multitenant Mode

This topic describes the procedure to run WS-AppServer in Multitenant mode.

Multitenant refers to a single instance of an application serving multiple client organizations (tenants). The following are the salient features of Multitenant deployment of Process Platform:

  • Achieve the desired isolation between tenants by creating a separate organization for each tenant.
  • Ensure scalabilty by sharing resources. In Process Platform, this is achieved by using the same Service Container to cater to multiple tenants.

A WS-AppServer Service Container running in system organization will be able to perform the following tasks:

  • Work with multiple databases, one for each tenant if needed.
  • Work with multiple versions of the application JAR, one for each tenant if required
  • Allow the hosting party to offer different levels of service to different tenants (This feature is restricted to Advanced Properties of a DSO currently).

Note:
For managing the new tenants or changing the configuration of the existing tenants, the Service Container need not be restarted.

  1. Install the application ISVP.
  2. Place the application JARs in the WS-AppServer Deploy folder.
    1. The wsapps.properties file in CORDYS_INSTALL_DIR/components/wsappserver/config folder has the property wsappserver.deploy.folder which specifies the location of the WS-AppServer Deploy folder.
  3. Create a Service Group and Service Container for the application in the System organization.
    1. Attach the application Web services to the Service group.
    2. Create a DSO for the application in the System organization and point the Service Container to the DSO.(The DSO should be a valid DSO though it is not used)
  4. For a tenant to subscribe to the application, the following steps should be performed:
    1. Create a DSO with the name of the DSO to which the Service Container points.
    2. Make the DSO point to the tenant database.
    3. If the application JARs have been customized, place the JARs specific to the tenant in the WS-AppServer deploy folder. For example if the organization name is Acme then the folder name will be Acme in the WS-AppServer deploy folder.
  5. Customize the Advanced Properties of a DSO for the tenant. Customizing the properties involves the following steps:
    1. Define the levels of the Service in the XML Store in plans file which is in the ISV space at the location /Cordys/configurations/.
    2. The structure of the XML is as follows
      <Levels xmlns="http://schemas.cordys.com/levels">
          <Level name="gold">
              <dso>
                  <cursorCacheSize>50</cursorCacheSize>
                  <cursorCacheRefreshInterval>30</cursorCacheRefreshInterval>
                  <queryCacheSize>50</queryCacheSize>
                  <queryCacheRefreshInterval>3600</queryCacheRefreshInterval>
                  <maximumWriteConnections>10</maximumWriteConnections>
                  <maximumReadConnections>10</maximumReadConnections>
                  <minimumReadConnections>1</minimumReadConnections>
                  <minimumWriteConnections>1</minimumWriteConnections>
                  <connectionPoolRefreshInterval>3600</connectionPoolRefreshInterval>
                  <multibyte>true</multibyte>
                  <multithreaded>true</multithreaded>
                  <sharedPool>true</sharedPool>
                  <xsiNilForNullData>true</xsiNilForNullData>
              </dso>
          </Level>
          <Level name="silver">
              <dso>
                  <cursorCacheSize>50</cursorCacheSize>
                  <cursorCacheRefreshInterval>30</cursorCacheRefreshInterval>
                  <queryCacheSize>50</queryCacheSize>
                  <queryCacheRefreshInterval>3600</queryCacheRefreshInterval>
                  <maximumWriteConnections>5</maximumWriteConnections>
                  <maximumReadConnections>5</maximumReadConnections>
                  <minimumReadConnections>1</minimumReadConnections>
                  <minimumWriteConnections>1</minimumWriteConnections>
                  <connectionPoolRefreshInterval>3600</connectionPoolRefreshInterval>
                  <multibyte>true</multibyte>
                  <multithreaded>true</multithreaded>
                  <sharedPool>true</sharedPool>
                  <xsiNilForNullData>true</xsiNilForNullData>
              </dso>
          </Level>
          <Level name="platinum">
              <dso>
                  <cursorCacheSize>50</cursorCacheSize>
                  <cursorCacheRefreshInterval>30</cursorCacheRefreshInterval>
                  <queryCacheSize>50</queryCacheSize>
                  <queryCacheRefreshInterval>3600</queryCacheRefreshInterval>
                  <maximumWriteConnections>15</maximumWriteConnections>
                  <maximumReadConnections>15</maximumReadConnections>
                  <minimumReadConnections>1</minimumReadConnections>
                  <minimumWriteConnections>1</minimumWriteConnections>
                  <connectionPoolRefreshInterval>3600</connectionPoolRefreshInterval>
                  <multibyte>true</multibyte>
                  <multithreaded>true</multithreaded>
                  <sharedPool>true</sharedPool>
                  <xsiNilForNullData>true</xsiNilForNullData>
              </dso>
          </Level>
      </Levels>
      

      Note: Currently, there is no User Interface for defining levels.

    3. After defining the levels, Manage Database Configurations screen displays a select box through which the administrator can define the level of the DSO. This will ensure that the Advanced Properties of a DSO are picked from the XML Store.
    4. If no levels are defined, the Advanced Properties of a DSO are picked from the Service Container.
  6. Whenever a tenant is changed, the administrator should invoke the ResetTenantCache Web service in the organization of the tenant.
  7. If a global change that impacts all the tenants is made, the administrator should Reset the Service Container cache.